//  this library.
/// 订单类型
enum OrderTypeEnum {
  openGroup,
  onlineOrder,
  openCourse,
  openCode,
  userCode,
  ;

  const OrderTypeEnum();

  static OrderTypeEnum? getTypeEnum(String type) {
    var values = OrderTypeEnum.values;
    for (var value in values) {
      if (value.name == type) {
        return value;
      }
    }
    return null;
  }
}

Map<String, String> orderTypeMap = {
  "openGroup": "开课",
  "onlineOrder": "线上订单",
  "openCourse": "开课",
  "openCode": "开课",
  "userCode": "用户",
};


enum OrderStatusEnum {
  waitPay,
  waitSend,
  waitSign,
  success,
  applyRefund,
  refunding,
  refundFail,
  refundSuccess,
  cancel,
  expired,
  delete,
  ;

  const OrderStatusEnum();

  static OrderStatusEnum? getTypeEnum(String type) {
    var values = OrderStatusEnum.values;
    for (var value in values) {
      if (value.name == type) {
        return value;
      }
    }
    return null;
  }
}
